<template>
  <view class="basic">
    <left-menu :scrollHeight="scrollHeight" @change="changeMenu" />
    <right-content :scrollHeight="scrollHeight" ref="rightContent" />
    <cart />
  </view>
</template>
<script>
import LeftMenu from "./LeftMenu/LeftMenu.vue"
import RightContent from "./RightContent/RightContent.vue"
import Cart from "./Cart/Cart.vue"

export default {
  name: "Basic",
  components: {
    LeftMenu,
    RightContent,
    Cart
  },
  props: {
    scrollHeight: {
      type: Number,
      default: 0
    }
  },
  methods: {
    changeMenu(index) {
      this.$refs.rightContent.scrollToCategory(index)
    }
  }
}
</script>
<style lang="scss" scoped>
.basic {
  position: relative;
  width: 750rpx;
  display: flex;
  flex-direction: row;
}
</style>
